package com.xiaodimall.backsys.common;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Author: CJJ
 * @Date: Created in 2022/11/27 18:04
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class CascadeSelectionResult {

    /**
     *  外层选项的值(id)
     */
    private String value;

    /**
     *  外层选项的标签(名称)
     */
    private String label;

    /**
     * 子选项
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<CascadeSelectionResult> children;

    public CascadeSelectionResult(String value, String label) {
        this.value = value;
        this.label = label;
    }
}
